<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/><meta name="theme-color" content="#3b3e43"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="format-detection" content="telephone=no"/><title>Liferay 5.1.1 安装与整合CAS - D 的个人博客</title><meta name="description" content="Liferay 5.1.1 安装与整合 CAS 转载请保留作者信息： 作者：88250 Blog：http:blog.csdn.netDL88250 MSN Gmail QQ：DL88250@gmail.com  1	目录
 2
 3
 4摘要	1
 5
 6环境	1
 7
 8下载Liferay
 95.1.1	2
10
11配置数据库	2
12
13配置数据源	2
14
15生成数据库	2
16
17创建数据库用户	2
18
19添加数据库连接驱动	2
20
21测试登录	3
22
23整合CAS	3
24
25配置CAS
26Server	3
27
28启用Tomcat
29SSL	3
30
31配置CAS...."/><meta property="og:description" content="Liferay 5.1.1 安装与整合 CAS 转载请保留作者信息： 作者：88250 Blog：http:blog.csdn.netDL88250 MSN Gmail QQ：DL88250@gmail.com  1	目录
 2
 3
 4摘要	1
 5
 6环境	1
 7
 8下载Liferay
 95.1.1	2
10
11配置数据库	2
12
13配置数据源	2
14
15生成数据库	2
16
17创建数据库用户	2
18
19添加数据库连接驱动	2
20
21测试登录	3
22
23整合CAS	3
24
25配置CAS
26Server	3
27
28启用Tomcat
29SSL	3
30
31配置CAS...."/>    <meta name="keywords" content="88250"/><link rel="dns-prefetch" href="https://cdn.jsdelivr.net/gh/88250/solo@4.2.0/src/main/resources"/><link rel="dns-prefetch" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="https://cdn.jsdelivr.net/gh/88250/solo@4.2.0/src/main/resources"><link rel="icon" type="image/png" href="https://img.hacpai.com/avatar/1353745196354_1584267806213.jpeg?imageView2/1/w/256/h/256/interlace/0/q/100"/><link rel="apple-touch-icon" href="https://img.hacpai.com/avatar/1353745196354_1584267806213.jpeg?imageView2/1/w/256/h/256/interlace/0/q/100"><link rel="shortcut icon" type="image/x-icon" href="https://img.hacpai.com/avatar/1353745196354_1584267806213.jpeg?imageView2/1/w/256/h/256/interlace/0/q/100"><meta name="copyright" content="B3log"/><meta http-equiv="Window-target" content="_top"/><meta property="og:locale" content="zh_CN"/><meta property="og:title" content="Liferay 5.1.1 安装与整合CAS - D 的个人博客"/><meta property="og:site_name" content="D 的个人博客"/><meta property="og:url"      content="https://dl88250.gitee.io/articles/2008/08/20/1219250340000.html?"/><meta property="og:image" content="https://img.hacpai.com/avatar/1353745196354_1584267806213.jpeg?imageView2/1/w/256/h/256/interlace/0/q/100"/><link rel="search" type="application/opensearchdescription+xml" title="Liferay 5.1.1 安装与整合CAS - D 的个人博客" href="/opensearch.xml"><link href="https://dl88250.gitee.io/rss.xml" title="RSS" type="application/rss+xml" rel="alternate"/><link rel="manifest" href="https://dl88250.gitee.io/manifest.json">        <link rel="canonical" href="https://dl88250.gitee.io/articles/2008/08/20/1219250340000.html">        <link rel="stylesheet"
              href="https://cdn.jsdelivr.net/gh/88250/solo@4.2.0/src/main/resources/skins/Bubble/css/base.css?1593357893538"/>
            <link rel="prev" title="Cannot recover key" href="https://dl88250.gitee.io/articles/2008/08/19/1219143660000.html">
            <link rel="next" title="定制CAS登录验证" href="https://dl88250.gitee.io/articles/2008/08/26/1219750620000.html">
    <script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?cf42ff23d16b7774f35a38218377e8a0";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body class="fn__flex-column">
<div id="pjax" class="fn__flex-1">
    
    <progress class="fn__progress"></progress>
    <header class="header header--article">
        <div class="wrapper header__title">
            <h1 class="header__h1 fn__flex-inline">
                <a href="https://dl88250.gitee.io" rel="start">D 的个人博客</a>
            </h1>
            <h2 class="header__desc header__desc--title">全职做开源，自由职业者</h2>
            <div class="header__desc">
                
            </div>
            <svg class="header__down" id="headerDown" viewBox="0 0 32 32" width="100%" height="100%">
                <path d="M15.992 25.304c-0 0-0 0-0.001 0-0.516 0-0.981-0.216-1.31-0.563l-0.001-0.001-14.187-14.996c-0.306-0.323-0.494-0.76-0.494-1.241 0-0.998 0.809-1.807 1.807-1.807 0.517 0 0.983 0.217 1.313 0.565l0.001 0.001 12.875 13.612 12.886-13.612c0.331-0.348 0.797-0.565 1.314-0.565 0.481 0 0.918 0.187 1.242 0.493l-0.001-0.001c0.723 0.687 0.755 1.832 0.072 2.555l-14.201 14.996c-0.33 0.348-0.795 0.564-1.311 0.564-0.001 0-0.003 0-0.004 0h0z"></path>
            </svg>
        </div>
    </header>
    <div class="side__menu">
        <svg viewBox="0 0 32 32" width="100%" height="100%">
            <path d="M30 18h-28c-1.1 0-2-0.9-2-2s0.9-2 2-2h28c1.1 0 2 0.9 2 2s-0.9 2-2 2zM30 6.25h-28c-1.1 0-2-0.9-2-2s0.9-2 2-2h28c1.1 0 2 0.9 2 2s-0.9 2-2 2zM2 25.75h28c1.1 0 2 0.9 2 2s-0.9 2-2 2h-28c-1.1 0-2-0.9-2-2s0.9-2 2-2z"></path>
        </svg>
        <span>
            &nbsp; menu
        </span>
    </div>
    <div class="side__main">
        <div class="side__bg"></div>
        <div class="side__panel">
            <svg class="side__close ft__a" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"
                 viewBox="0 0 20 20">
                <path d="M18.362 19.324c-0.902 0.902-2.363 0.902-3.263 0l-5.098-5.827-5.098 5.825c-0.902 0.902-2.363 0.902-3.263 0-0.902-0.902-0.902-2.363 0-3.263l5.304-6.057-5.306-6.061c-0.902-0.902-0.902-2.361 0-3.263s2.361-0.902 3.263 0l5.1 5.829 5.098-5.829c0.902-0.902 2.361-0.902 3.263 0s0.902 2.363 0 3.263l-5.304 6.061 5.304 6.057c0.902 0.902 0.902 2.363 0 3.265z"></path>
            </svg>

            <div class="side__header">
                <a href="https://dl88250.gitee.io" rel="start"><img class="side__logo" alt="D 的个人博客" src="https://img.hacpai.com/avatar/1353745196354_1584267806213.jpeg?imageView2/1/w/128/h/128/interlace/0/q/100"></a>

                <div class="side__meta">
                    413 文章 <br>
                    <span data-uvstaturl="https://dl88250.gitee.io">3446695</span> 浏览
                    
                </div>
            </div>

            <div class="side__title">
                <span>ღゝ◡╹)ノ❤️</span>
            </div>
            <ul class="side__nav">
                <li>
                    <a href="https://dl88250.gitee.io" rel="start">
                            D 的个人博客
                    </a>
                </li>
                    <li>
                        <a href="/about" target="_self"><img
                                class="page-icon" src="https://static.hacpai.com/images/tags/react.png" alt="关于我">关于我</a>
                    </li>
                    <li>
                        <a href="/my-github-repos" target="_self"><img
                                class="page-icon" src="/images/github-icon.png" alt="我的开源">我的开源</a>
                    </li>
                    <li>
                        <a href="https://hacpai.com" target="_blank"><img
                                class="page-icon" src="https://static.hacpai.com/images/favicon.png" alt="黑客派">黑客派</a>
                    </li>
                    <li>
                        <a href="https://b3log.org" target="_blank"><img
                                class="page-icon" src="https://static.b3log.org/images/brand/b3log-32.png" alt="B3log">B3log</a>
                    </li>
                <li>
                    <a href="https://dl88250.gitee.io/categories.html">分类</a>
                </li>
                <li>
                    <a href="https://dl88250.gitee.io/tags.html">标签墙</a>
                </li>
                <li>
                    <a href="https://dl88250.gitee.io/archives.html">存档</a>
                </li>
                <li>
                    <a href="https://dl88250.gitee.io/links.html">友情链接</a>
                </li>
                <li>
                    <a rel="alternate" href="https://dl88250.gitee.io/rss.xml">RSS</a>
                </li>
            </ul>
        </div>
    </div>
    <div class="article__top" style="background-image: url(https://img.hacpai.com/bing/20180515.jpg?imageView2/1/w/1280/h/720/interlace/1/q/100)">
        <div style="background-image: url(https://img.hacpai.com/bing/20180515.jpg?imageView2/1/w/1280/h/720/interlace/1/q/100)"></div>
        <canvas id="articleTop"></canvas>
    </div>
    <div class="article">
        <div class="ft__center">
            <div class="article__meta">
                <time>
                    2008-08-21
                </time>
                /
                    <a rel="tag"
                       href="https://dl88250.gitee.io/tags/Network%20Engineering">Network Engineering</a> &nbsp;
                    <a rel="tag"
                       href="https://dl88250.gitee.io/tags/Open%20Source">Open Source</a> &nbsp;
                    <a rel="tag"
                       href="https://dl88250.gitee.io/tags/Portal%20%26amp%3B%20Portlet">Portal &amp; Portlet</a> &nbsp;
                    <a rel="tag"
                       href="https://dl88250.gitee.io/tags/J2EE%2FJavaEE">J2EE/JavaEE</a> &nbsp;
                    <a rel="tag"
                       href="https://dl88250.gitee.io/tags/CAS%20%26amp%3B%20SAML%20%26amp%3B%20SSO">CAS &amp; SAML &amp; SSO</a> &nbsp;
            </div>
            <h2 class="article__title">
                Liferay 5.1.1 安装与整合CAS
            </h2>
<div class="article__share"
     data-title="Liferay 5.1.1 安装与整合CAS"
     data-blogtitle="D 的个人博客"
     data-url="https://dl88250.gitee.io/articles/2008/08/20/1219250340000.html"
     data-avatar="https://img.hacpai.com/avatar/1353745196354_1584267806213.jpeg?imageView2/1/w/128/h/128/interlace/0/q/100">
    <span class="item" data-type="qqz">
        <svg viewBox="0 0 32 32" width="100%" height="100%">
            <path d="M22.824 13.989l-8.348 6.287s3.351 0.522 8.404 0.461l-0.23-1.040 7.2-6.549c0.132-0.12 0.183-0.312 0.129-0.487s-0.203-0.299-0.377-0.314l-9.492-0.856-3.708-9.213c-0.068-0.169-0.226-0.279-0.401-0.279s-0.333 0.11-0.401 0.279l-3.708 9.213-9.492 0.856c-0.174 0.015-0.323 0.139-0.377 0.314s-0.004 0.366 0.129 0.487l7.2 6.549-2.158 9.742c-0.040 0.178 0.026 0.365 0.168 0.474 0.142 0.107 0.331 0.115 0.481 0.021l8.158-5.165 8.158 5.165c0.070 0.045 0.147 0.066 0.225 0.066 0.090 0 0.18-0.029 0.256-0.086 0.142-0.109 0.208-0.295 0.168-0.474l-1.707-7.704c0.732-0.386 1.538-1.040 1.538-1.040s-3.195 1.638-14.664 0.838l8.312-6.325s-0.327-0.534-10.744-0.914c-0.697-0.026 8.493-1.83 15.281-0.305z"></path>
        </svg>
    </span>
    <span class="item" data-type="wechat">
        <svg viewBox="0 0 32 32" width="100%" height="100%">
            <path d="M9.062 9.203c0-0.859-0.562-1.422-1.422-1.422-0.844 0-1.703 0.562-1.703 1.422 0 0.844 0.859 1.406 1.703 1.406 0.859 0 1.422-0.562 1.422-1.406zM20.672 17.125c0-0.562-0.562-1.125-1.422-1.125-0.562 0-1.125 0.562-1.125 1.125 0 0.578 0.562 1.141 1.125 1.141 0.859 0 1.422-0.562 1.422-1.141zM16.984 9.203c0-0.859-0.562-1.422-1.406-1.422-0.859 0-1.703 0.562-1.703 1.422 0 0.844 0.844 1.406 1.703 1.406 0.844 0 1.406-0.562 1.406-1.406zM26.906 17.125c0-0.562-0.578-1.125-1.422-1.125-0.562 0-1.125 0.562-1.125 1.125 0 0.578 0.562 1.141 1.125 1.141 0.844 0 1.422-0.562 1.422-1.141zM22.75 10.922c-0.359-0.047-0.719-0.063-1.094-0.063-5.375 0-9.625 4.016-9.625 8.953 0 0.828 0.125 1.625 0.359 2.375-0.359 0.031-0.703 0.047-1.063 0.047-1.422 0-2.547-0.281-3.969-0.562l-3.953 1.984 1.125-3.406c-2.828-1.984-4.531-4.547-4.531-7.656 0-5.391 5.094-9.625 11.328-9.625 5.563 0 10.453 3.391 11.422 7.953zM32 19.687c0 2.547-1.688 4.813-3.969 6.516l0.859 2.828-3.109-1.703c-1.141 0.281-2.281 0.578-3.406 0.578-5.391 0-9.625-3.688-9.625-8.219s4.234-8.219 9.625-8.219c5.094 0 9.625 3.688 9.625 8.219z"></path>
        </svg>
    </span>
    <span class="item" data-type="weibo">
        <svg viewBox="0 0 32 32" width="100%" height="100%">
            <path d="M13.444 27.064c-5.3 0.525-9.875-1.875-10.219-5.35-0.344-3.481 3.675-6.719 8.969-7.244 5.3-0.525 9.875 1.875 10.212 5.35 0.35 3.481-3.669 6.725-8.963 7.244zM24.038 15.521c-0.45-0.137-0.762-0.225-0.525-0.819 0.512-1.287 0.563-2.394 0.006-3.188-1.038-1.481-3.881-1.406-7.137-0.037 0 0-1.025 0.444-0.762-0.363 0.5-1.613 0.425-2.956-0.356-3.737-1.769-1.769-6.469 0.069-10.5 4.1-3.013 3.006-4.763 6.212-4.763 8.981 0 5.287 6.787 8.506 13.425 8.506 8.7 0 14.494-5.056 14.494-9.069 0-2.431-2.044-3.806-3.881-4.375z"></path>
            <path d="M29.819 5.833c-2.1-2.331-5.2-3.219-8.063-2.612v0c-0.663 0.144-1.081 0.794-0.938 1.45 0.144 0.662 0.788 1.081 1.45 0.938 2.038-0.431 4.238 0.2 5.731 1.856s1.9 3.913 1.256 5.888v0c-0.206 0.644 0.144 1.331 0.788 1.544 0.644 0.206 1.331-0.144 1.544-0.787v-0.006c0.9-2.762 0.331-5.938-1.769-8.269z"></path>
            <path d="M26.588 8.752c-1.025-1.138-2.538-1.569-3.925-1.269-0.569 0.119-0.931 0.688-0.813 1.256 0.125 0.569 0.688 0.931 1.25 0.806v0c0.681-0.144 1.419 0.069 1.919 0.619 0.5 0.556 0.637 1.313 0.419 1.975v0c-0.175 0.55 0.125 1.15 0.681 1.331 0.556 0.175 1.15-0.125 1.331-0.681 0.438-1.356 0.163-2.906-0.863-4.037z"></path>
            <path d="M13.738 20.771c-0.188 0.319-0.594 0.469-0.912 0.337-0.319-0.125-0.412-0.488-0.231-0.794 0.188-0.306 0.581-0.456 0.894-0.337 0.313 0.113 0.425 0.469 0.25 0.794zM12.044 22.933c-0.512 0.819-1.613 1.175-2.438 0.8-0.813-0.369-1.056-1.319-0.544-2.119 0.506-0.794 1.569-1.15 2.388-0.806 0.831 0.356 1.1 1.3 0.594 2.125zM13.969 17.146c-2.519-0.656-5.369 0.6-6.463 2.819-1.119 2.262-0.037 4.781 2.506 5.606 2.638 0.85 5.75-0.456 6.831-2.894 1.069-2.394-0.262-4.85-2.875-5.531z"></path>
        </svg>
    </span>
    <span class="item" data-type="twitter">
        <svg viewBox="0 0 32 32" width="100%" height="100%">
            <path d="M32.003 6.075c-1.175 0.525-2.444 0.875-3.769 1.031 1.356-0.813 2.394-2.1 2.887-3.631-1.269 0.75-2.675 1.3-4.169 1.594-1.2-1.275-2.906-2.069-4.794-2.069-3.625 0-6.563 2.938-6.563 6.563 0 0.512 0.056 1.012 0.169 1.494-5.456-0.275-10.294-2.888-13.531-6.862-0.563 0.969-0.887 2.1-0.887 3.3 0 2.275 1.156 4.287 2.919 5.463-1.075-0.031-2.087-0.331-2.975-0.819 0 0.025 0 0.056 0 0.081 0 3.181 2.263 5.838 5.269 6.437-0.55 0.15-1.131 0.231-1.731 0.231-0.425 0-0.831-0.044-1.237-0.119 0.838 2.606 3.263 4.506 6.131 4.563-2.25 1.762-5.075 2.813-8.156 2.813-0.531 0-1.050-0.031-1.569-0.094 2.913 1.869 6.362 2.95 10.069 2.95 12.075 0 18.681-10.006 18.681-18.681 0-0.287-0.006-0.569-0.019-0.85 1.281-0.919 2.394-2.075 3.275-3.394z"></path>
        </svg>
    </span>
    <span class="item__qr"></span>
</div>        </div>
        <div class="wrapper">
            <section class="vditor-reset articles article__content">
                <p style="margin-top: 0.17in; page-break-after: avoid;" align="center"><font face="Nimbus Sans L, sans-serif"><font style="font-size: 20pt;" size="5">Liferay
5.1.1 </font></font><font face="DejaVu Sans"><font style="font-size: 20pt;" size="5">安装与整合</font></font><font face="Nimbus Sans L, sans-serif"><font style="font-size: 20pt;" size="5">CAS</font></font></p>
<p align="center"><br><br>
</p>
<p><font face="Microsoft YaHei">转载请保留作者信息：</font></p>
<p><font face="DejaVu Sans"><font face="Microsoft YaHei">作者：</font></font><font face="Microsoft YaHei">88250</font></p>
<p><font face="Microsoft YaHei">Blog</font><font face="DejaVu Sans"><font face="Microsoft YaHei">：</font></font><a href="http://blog.csdn.net/DL88250" target="_blank"><font color="#2300dc"><font face="Microsoft YaHei">http:/blog.csdn.net/DL88250</font></font></a></p>
<p><font face="Microsoft YaHei">MSN &amp; Gmail &amp;
QQ</font><font face="DejaVu Sans"><font face="Microsoft YaHei">：</font></font><font face="Microsoft YaHei">DL88250@gmail.com</font></p>
<div id="Table of Contents1" dir="ltr" style="background: transparent none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
	<div id="Table of Contents1_Head" dir="ltr">
		<p style="margin-right: 0.4in; margin-top: 0.17in; page-break-after: avoid;">
		<font face="DejaVu Sans"><font style="font-size: 16pt;" size="4"><b>目录</b></font></font></p>
	</div>
	<p style="margin-left: 0.2in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">摘要</font></font><font size="4">	1</font></p>
	<p style="margin-left: 0.39in; margin-right: 0.4in; margin-bottom: 0in; page-break-before: auto;">
	<font face="DejaVu Sans"><font size="3">环境</font></font><b>	1</b></p>
	<p style="margin-left: 0.39in; margin-right: 0.4in; margin-bottom: 0in; page-break-before: auto;">
	<font face="DejaVu Sans"><font size="3">下载</font></font><b>Liferay
	5.1.1	2</b></p>
	<p style="margin-left: 0.39in; margin-right: 0.4in; margin-bottom: 0in; page-break-before: auto;">
	<font face="DejaVu Sans"><font size="3">配置数据库</font></font><b>	2</b></p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">配置数据源</font></font>	2</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">生成数据库</font></font>	2</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">创建数据库用户</font></font>	2</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">添加数据库连接驱动</font></font>	2</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">测试登录</font></font>	3</p>
	<p style="margin-left: 0.39in; margin-right: 0.4in; margin-bottom: 0in; page-break-before: auto;">
	<font face="DejaVu Sans"><font size="3">整合</font></font><b>CAS	3</b></p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">配置</font></font>CAS
	Server	3</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">启用</font></font>Tomcat
	SSL	3</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">配置</font></font>CAS
	Client	3</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">使用</font></font>JDK<font face="DejaVu Sans"><font size="3">工具</font></font>keytool<font face="DejaVu Sans"><font size="3">生成</font></font>SSL<font face="DejaVu Sans"><font size="3">证书</font></font>	3</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">测试</font></font>SSL<font face="DejaVu Sans"><font size="3">连接</font></font>	4</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">配置</font></font>CAS	4</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	CAS<font face="DejaVu Sans"><font size="3">登录验证</font></font>	5</p>
	<p style="margin-left: 0.79in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">定制</font></font>CAS<font face="DejaVu Sans"><font size="3">登录验证</font></font>	5</p>
	<p style="margin-left: 0.2in; margin-right: 0.4in; margin-bottom: 0in;">
	<font face="DejaVu Sans"><font size="3">总结</font></font><font size="4">	5</font></p>
</div>
<p style="margin-bottom: 0in;"><br>
</p>
<h2 class="western" id="toc_h2_0"><font face="DejaVu Sans">摘要</font></h2>
<p style="margin-bottom: 0in;">Liferay<font face="DejaVu Sans">目前很强大的一个</font>Portal
Application &amp;
Framework<font face="DejaVu Sans">，它实现了很多规范，其设计、功能与用户体验不是其他门户系统可以相比的。最近，</font>Liferay<font face="DejaVu Sans">刚刚拿到了</font>2008<font face="DejaVu Sans">开源门户大奖，而且</font>Sun<font face="DejaVu Sans">公司加入也到了</font>Liferay<font face="DejaVu Sans">社区中，参与一些</font>Portlet<font face="DejaVu Sans">的开发。可以看出，其前景很好。不过，由于官方的文档还没有出，而且</font>Liferay
5.1.x<font face="DejaVu Sans">与</font>4.x<font face="DejaVu Sans">在配置上有很大差别，在此，我将我的安装与配置经验分享给大家：）</font></p>
<h3 class="western" id="toc_h3_1"><font face="DejaVu Sans">环境</font></h3>
<ul><li><p style="margin-bottom: 0in;">MySQL5.0.5</p>
	</li><li><p style="margin-bottom: 0in;">JRE 1.6.0.7</p>
	</li><li><p style="margin-bottom: 0in;">Liferay 5.1.1 Bundled with Tomcat</p>
	</li><li><p style="margin-bottom: 0in;">Ubuntu 8.04</p>
</li></ul>
<p style="margin-bottom: 0in;"><br>
</p>
<h3 class="western" id="toc_h3_2"><font face="DejaVu Sans">下载</font>Liferay
5.1.1</h3>
<ol><p style="margin-bottom: 0in;"><font face="DejaVu Sans">到官方下载主页：
	</font><a href="http://www.liferay.com/web/guest/downloads/portal" target="_blank">http://www.liferay.com/web/guest/downloads/portal</a>
	<font face="DejaVu Sans">下载 </font><a href="http://downloads.sourceforge.net/lportal/liferay-portal-tomcat-6.0-5.1.1.zip" target="_blank">Bundled
	with Tomcat 6.0 </a><font face="DejaVu Sans">并解压到你指定的位置</font>(<font face="DejaVu Sans">即安装目录
	</font>$LIFERAY_HOME)<font face="DejaVu Sans">。</font></p><p style="margin-bottom: 0in;"></p></ol>
<h3 class="western" id="toc_h3_3"><font face="DejaVu Sans">配置数据库</font></h3>
<h5 class="western" id="toc_h5_4"><font face="DejaVu Sans">配置数据源</font></h5>
<ol><p style="margin-bottom: 0in;"><font face="DejaVu Sans">编辑
	</font>$LIFERAY_HOME/conf/Catalina/localhost/ROOT.xml <font face="DejaVu Sans">注释掉
	</font>Hypersonic<font face="DejaVu Sans">段，反注释
	</font>MySQL<font face="DejaVu Sans">段，修改你的 </font>MySQL
	<font face="DejaVu Sans">配置（<font color="#ff0000">红色</font>部分可能需要修改，本文均如此），如下：</font></p></ol>
<p style="margin-bottom: 0in;"><font style="font-size: 9pt;" size="2">			<font face="Courier 10 Pitch">&lt;!--
Hypersonic --&gt; </font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">		&lt;!--
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">			&lt;Resource
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				name="jdbc/LiferayPool"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				auth="Container"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				type="javax.sql.DataSource"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				driverClassName="org.hsqldb.jdbcDriver"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				url="jdbc:hsqldb:lportal"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				username="sa"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				password=""
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				maxActive="20"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">			/&gt;
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">		--&gt;
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">			&lt;!--
MySQL --&gt; </font></font>
</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">			&lt;Resource
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				name="jdbc/LiferayPool"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				auth="Container"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				type="javax.sql.DataSource"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				driverClassName="com.mysql.jdbc.Driver"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				url="jdbc:mysql://<font color="#ff0000">localhost:3306</font>/lportal?					</font></font></p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">
</font></font></p><p><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;useFastDateParsing=false"<br>
</font></font></p>
<p></p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				username="<font color="#ff0000">lportal</font>"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				password="<font color="#ff0000">dl88250</font>"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">				maxActive="20"
</font></font>
</p>
<p style="margin-bottom: 0in;"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">			/&gt;</font></font></p>
<p style="margin-bottom: 0in;"><br>
</p>
<h5 class="western" id="toc_h5_5"><font face="DejaVu Sans">生成数据库</font></h5>
<ol start="0"><p style="margin-bottom: 0in;"><font face="DejaVu Sans">到
	</font><a href="http://www.liferay.com/web/guest/downloads/additional" target="_blank">http://www.liferay.com/web/guest/downloads/additional</a>
	<font face="DejaVu Sans">下载数据库生成脚本 </font><a href="http://downloads.sourceforge.net/lportal/liferay-portal-sql-5.1.1.zip" target="_blank">Liferay
	Portal 5.1.1 SQL Scripts</a>
	<font face="DejaVu Sans">解压后在目录</font>create<font face="DejaVu Sans">下找到</font>create-mysql.sql<font face="DejaVu Sans">，将该脚本导入</font>MySQL<font face="DejaVu Sans">，创建</font>Liferay<font face="DejaVu Sans">数据库（使用默认恢复，也就是恢复</font>sample
	data<font face="DejaVu Sans">那种）。</font></p></ol>
<h5 class="western" id="toc_h5_6"><font face="DejaVu Sans">创建数据库用户</font></h5>
<ol start="0"><p style="margin-bottom: 0in;"><font face="DejaVu Sans">创建用户
	</font>lportal<font face="DejaVu Sans">（在</font>2.a<font face="DejaVu Sans">配置中提到的），并将</font>schema
	lportal<font face="DejaVu Sans">的所有操作授权给该用户。</font></p></ol>
<h5 class="western" id="toc_h5_7"><font face="DejaVu Sans">添加数据库连接驱动</font></h5>
<ol start="0"><p style="margin-bottom: 0in;"><font face="DejaVu Sans">下载 </font>MySQL
	connector jar,
	<a href="http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.6.tar.gz/from/pick#mirrors" target="_blank">http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.6.tar.gz/from/pick#mirrors</a>
	<font face="DejaVu Sans">并将该</font>jar<font face="DejaVu Sans">放到
	</font>$LIFERAY_HOME/lib <font face="DejaVu Sans">下。</font></p></ol>
<h5 class="western" id="toc_h5_8"><font face="DejaVu Sans">测试登录</font></h5>
<ol start="0"><p style="margin-bottom: 0in;"><font face="DejaVu Sans">测试一下，使用</font>test@liferay.com<font face="DejaVu Sans">，密码</font>test<font face="DejaVu Sans">登录</font>Liferay
	Portal<font face="DejaVu Sans">。</font></p></ol>
<ol start="0"><p style="margin-bottom: 0in;"></p></ol>
<h3 class="western" id="toc_h3_9"><font face="DejaVu Sans">整合</font>CAS</h3>
<p><font face="DejaVu Sans">理论上，</font>CAS
Server<font face="DejaVu Sans">应该部署在单独的验证服务器上，不过，由于环境所限，就将</font>CAS
Server<font face="DejaVu Sans">部署在</font>Liferay<font face="DejaVu Sans">的</font>Tomcat<font face="DejaVu Sans">下了。</font></p>
<h5 class="western" id="toc_h5_10"><font face="DejaVu Sans">配置</font>CAS Server</h5>
<ol><p><font face="DejaVu Sans">点<a href="http://www.liferay.com/web/guest/downloads/official_plugins/-/software_catalog/products/1180633?_98_redirect=/web/guest/downloads/official_plugins/-/software_catalog/products?_98_tabs1TabsScroll=&amp;_98_keywords=cas&amp;_98_type=" target="_blank">这里</a>下载，将这个</font>war<font face="DejaVu Sans">拷贝到
	</font>$HOME<font face="DejaVu Sans">下</font>liferay/deploy<font face="DejaVu Sans">（这个目录启动</font>Liferay
	Portal<font face="DejaVu Sans">后将自动生成，是</font>liferay
	plugins<font face="DejaVu Sans">的热部署目录），这样</font>Liferay<font face="DejaVu Sans">将自动部署</font>cas-server<font face="DejaVu Sans">。在
	</font>$LIFERAY_HOME/webapps/ <font face="DejaVu Sans">下看到</font>cas-web<font face="DejaVu Sans">，说明部署成功。</font></p></ol>
<h5 class="western" id="toc_h5_11"><font face="DejaVu Sans">启用</font>Tomcat SSL</h5>
<ol start="0"><p><font face="DejaVu Sans">编辑
	</font>$LIFERAY_HOME/conf/server.xml<font face="DejaVu Sans">，反注释</font>SSL<font face="DejaVu Sans">配置段，如下：</font></p></ol>
<p><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">	&lt;!--
Define a SSL HTTP/1.1 Connector on port 8443 </font></font>
</p>
<p>       <font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">	
 This connector uses the JSSE configuration, when using APR, the </font></font>
</p>
<p><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">	
        connector should be using the OpenSSL style configuration </font></font>
</p>
<p>       <font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">	
 described in the APR documentation --&gt; </font></font>
</p>
<p><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">	</font></font></p>
<p>    <font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">	&lt;Connector
port="8443" protocol="HTTP/1.1" SSLEnabled="true"
</font></font>
</p>
<p>       <font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">	
       maxThreads="150" scheme="https"
secure="true" </font></font>
</p>
<ol start="0"><p>             <font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">		
	clientAuth="false" sslProtocol="TLS" /&gt; </font></font>
	</p></ol>
<h5 class="western" id="toc_h5_12"><font face="DejaVu Sans">配置</font>CAS Client</h5>
<ol start="0"><p><font face="DejaVu Sans">点<a href="http://www.ja-sig.org/downloads/cas-clients/cas-client-2.0.11.zip" target="_blank">这里</a>下载</font>CAS<font face="DejaVu Sans">客户端（这个客户端用的是耶鲁大学的实现），解压后找到</font>casclient.jar<font face="DejaVu Sans">并放到
	</font>$LIFERAY_HOME/webapps/ROOT/WEB-INFO/lib/ <font face="DejaVu Sans">下。（貌似已经有这个</font>jar<font face="DejaVu Sans">了</font>-<font face="DejaVu Sans">　</font>-!<font face="DejaVu Sans">）</font></p></ol>
<h5 class="western" id="toc_h5_13"><font face="DejaVu Sans">使用</font>JDK<font face="DejaVu Sans">工具</font>keytool<font face="DejaVu Sans">生成</font>SSL<font face="DejaVu Sans">证书</font></h5>
<ol start="0"><p><font face="DejaVu Sans">在任何目录（我在</font>HOME<font face="DejaVu Sans">）下使用命令：</font></p><pre> <font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">keytool -genkey -alias tomcat -keypass changeit -keyalg RSA</font></font>
<p><font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2">将生成</font></font><font face="Courier 10 Pitch"><font style="font-size: 10pt;" size="2">.keystore</font></font><font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2">在</font></font><font face="Courier 10 Pitch"><font style="font-size: 10pt;" size="2">$HOME</font></font><font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2">下。</font></font><br>
<font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2"><b>注意：</b><span style="">在输入</span></font></font><font style="font-size: 10pt;" size="2"><font face="Courier 10 Pitch"><span style="">What is your first and last name? </span></font></font><font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2"><span style="">时请使用你的</span></font></font><font style="font-size: 10pt;" size="2"><font face="Courier 10 Pitch"><span style="">hostname</span></font></font><font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2"><span style="">（参考</span></font></font><font style="font-size: 10pt;" size="2"><font face="Courier 10 Pitch"><span style="">/etc/hosts</span></font></font><font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2"><span style="">文件），不要用</span></font></font><font style="font-size: 10pt;" size="2"><font face="Courier 10 Pitch"><span style="">IP</span></font></font><font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2"><span style="">。</span></font></font><br>
<font face="DejaVu Sans, sans-serif"><font style="font-size: 10pt;" size="2">整个过程如下：</font></font></p></pre></ol><p></p>
<pre style=""><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">daniel@daniel-desktop:~$ keytool -genkey -alias tomcat -keypass changeit -keyalg RSA </font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">Enter keystore password:  </font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">Re-enter new password: </font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">What is your first and last name? </font></font>
  <font style="font-size: 9pt;" size="2"><font face="Courier 10 Pitch"><span style="">[Unknown]:  </span></font><font color="#ff0000"><font face="Courier 10 Pitch"><span style="">daniel-desktop</span></font></font><font face="Courier 10 Pitch"><span style=""> </span></font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">What is the name of your organizational unit? </font></font>
  <font style="font-size: 9pt;" size="2"><font face="Courier 10 Pitch"><span style="">[Unknown]:  </span></font><font color="#ff0000"><font face="Courier 10 Pitch"><span style="">SEE </span></font></font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">What is the name of your organization? </font></font>
  <font style="font-size: 9pt;" size="2"><font face="Courier 10 Pitch"><span style="">[Unknown]:  </span></font><font color="#ff0000"><font face="Courier 10 Pitch"><span style="">Jinfonet</span></font></font><font face="Courier 10 Pitch"><span style=""> </span></font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">What is the name of your City or Locality? </font></font>
  <font style="font-size: 9pt;" size="2"><font face="Courier 10 Pitch"><span style="">[Unknown]:  </span></font><font color="#ff0000"><font face="Courier 10 Pitch"><span style="">Kunming </span></font></font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">What is the name of your State or Province? </font></font>
  <font style="font-size: 9pt;" size="2"><font face="Courier 10 Pitch"><span style="">[Unknown]:  </span></font><font color="#ff0000"><font face="Courier 10 Pitch"><span style="">Yunnan</span></font></font><font face="Courier 10 Pitch"><span style=""> </span></font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">What is the two-letter country code for this unit? </font></font>
  <font style="font-size: 9pt;" size="2"><font face="Courier 10 Pitch"><span style="">[Unknown]:  </span></font><font color="#ff0000"><font face="Courier 10 Pitch"><span style="">CN</span></font></font><font face="Courier 10 Pitch"><span style=""> </span></font></font>
<font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">Is CN=daniel-desktop, OU=SEE, O=Jinfonet, L=Kunming, ST=Yunnan, C=CN correct? </font></font>
  <font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2">[no]:  yes </font></font>
</pre><p>
</p><pre><code class="highlight-chroma"><span class="highlight-ln">1</span>&lt;font face="DejaVu Sans"&gt;从&lt;/font&gt;keystore&lt;font face="DejaVu Sans"&gt;中导出证书并将此证书导入到&lt;/font&gt;JRE&lt;font face="DejaVu Sans"&gt;中：&lt;/font&gt;&lt;/p&gt;
</code></pre>
<pre><font face="Courier 10 Pitch"><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2"><span style="">daniel@daniel-desktop:~$</span></font></font><font style="font-size: 9pt;" size="2"> keytool -export -alias tomcat -keypass changeit -file </font><font color="#ff0000"><font style="font-size: 9pt;" size="2">server.cert </font></font><font face="Courier 10 Pitch"><font style="font-size: 9pt;" size="2"><span style=""><br>daniel@daniel-desktop:~$</span></font></font> keytool -import -alias tomcat -file <font color="#ff0000">server.cert</font> -keypass changeit -keystore $JAVA_HOME/jre/lib/security/cacerts</font></pre><p>
</p><p><br><br></p>
<p></p>
<h5 class="western" id="toc_h5_14"><font face="DejaVu Sans">测试</font>SSL<font face="DejaVu Sans">连接</font></h5>
<ol start="0"><p><font face="DejaVu Sans">访问</font>https://<font color="#ff0000">daniel-desktop</font>:8443
	<font face="DejaVu Sans">（由于证书不是权威机构颁发，所以添加一下</font>exception<font face="DejaVu Sans">），这时页面将被自动跳转到</font>https://<font color="#ff0000">daniel-desktop</font>:8443/web/guest/home<font face="DejaVu Sans">，也就是我们</font>Liferay
	Portal<font face="DejaVu Sans">的首页。只是用的协议是</font>https<font face="DejaVu Sans">而已。这样，说明了</font>SSL<font face="DejaVu Sans">启用成功！</font></p></ol>
<h5 class="western" id="toc_h5_15"><font face="DejaVu Sans">配置</font>CAS</h5>
<ol start="0"><p><font face="DejaVu Sans">使用</font>test@liferay.com<font face="DejaVu Sans">帐号登录</font>Portal<font face="DejaVu Sans">，并使用</font>Enterprise
	Admin Portlet<font face="DejaVu Sans">设置</font>CAS<font face="DejaVu Sans">：</font></p><p>Enterprise Admin <font face="Times New Roman, serif">→</font>
	Settings <font face="Times New Roman, serif">→</font>
	Authentication <font face="Times New Roman, serif">→</font>
	CAS<font face="DejaVu Sans">，启用</font>CAS<font face="DejaVu Sans">，如下：</font></p><p><font face="DejaVu Sans">记得点</font>Save<font face="DejaVu Sans">。。。。</font></p><p><font face="DejaVu Sans">注销当前帐户（</font><a href="mailto:test@liferay.com" target="_blank">test@liferay.com</a><font face="DejaVu Sans">），可以看到</font>logout
	successful<font face="DejaVu Sans">的提示。再次使用
	</font><a href="http://daniel-desktop:8080/" target="_blank">http://</a><font color="#ff0000"><a href="http://daniel-desktop:8080/" target="_blank">daniel-</a><a href="http://daniel-desktop:8080/" target="_blank">desktop</a></font><a href="http://daniel-desktop:8080/" target="_blank">:8080</a>
	<font face="DejaVu Sans">访问并登录时将跳转到</font>CAS<font face="DejaVu Sans">验证页面，说明了</font>CAS<font face="DejaVu Sans">配置成功。</font></p></ol>
<h5 class="western" id="toc_h5_16">CAS<font face="DejaVu Sans">登录验证</font></h5>
<ol start="0"><p><font face="DejaVu Sans">在</font>CAS<font face="DejaVu Sans">的验证页面，使用</font>test<font face="DejaVu Sans">作为帐号，</font>test<font face="DejaVu Sans">作为密码（只要帐号</font>==<font face="DejaVu Sans">密码就可以了），测试一下能不能通过</font>CAS<font face="DejaVu Sans">的验证。结果应该是可以通过，但是跳转也没无任何显示。因为我们并没有真正通过我们的</font>Portal
	user<font face="DejaVu Sans">的帐号验证。</font></p><p><font face="DejaVu Sans">关于</font>CAS<font face="DejaVu Sans">与</font>Liferay
	<font face="DejaVu Sans">的整合细节请参考<a href="http://blog.csdn.net/DL88250/archive/2008/08/19/2794943.aspx" target="_blank">这里</a></font></p><p><font face="DejaVu Sans">关于</font>CAS<font face="DejaVu Sans">与</font>Tomcat<font face="DejaVu Sans">下的</font>SSO<font face="DejaVu Sans">请参考<a href="http://blog.csdn.net/DL88250/archive/2008/08/20/2799522.aspx" target="_blank">这里</a></font></p></ol>
<h5 class="western" id="toc_h5_17"><font face="DejaVu Sans">定制</font>CAS<font face="DejaVu Sans">登录验证</font></h5>
<p><strike>[<font face="DejaVu Sans">本部分没有完成，请大家关注本文作者</font>Blog<font face="DejaVu Sans">：
</font><a href="http://blog.csdn.net/DL88250" target="_blank">http://blog.csdn.net/DL88250</a>
<font face="DejaVu Sans">以获取最新参考</font>: )]</strike></p><p>参考这里：<a href="http://blog.csdn.net/DL88250/archive/2008/08/26/2831855.aspx" target="_blank">http://blog.csdn.net/DL88250/archive/2008/08/26/2831855.aspx</a><br></p>
<ol start="0"><p></p><p></p><p></p></ol>
<h2 class="western" id="toc_h2_18"><font face="DejaVu Sans">总结</font></h2>
<p><font face="DejaVu Sans">经过这一番“折腾”，我们的</font>Portal<font face="DejaVu Sans">终于可以用了。本次，我们学会了</font>Liferay
Portal<font face="DejaVu Sans">的基本配置，还有整合</font>CAS<font face="DejaVu Sans">。在此之后，还有很多需要改进的地方。例如界面定制、用户权限管理、扩展</font>Portlet
plugins/environment<font face="DejaVu Sans">应用等。在以后的文章中我将把我对</font>Liferay<font face="DejaVu Sans">的使用、配置、开发经验分享给大家，请大家积极给予关注哦
</font>: )</p>
                    <div>
                        <br>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- D博客文章签名档 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-5357405790190342"
     data-ad-slot="7757575754"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
                    </div>
            </section>
        </div>

    </div>
        <div class="post__toc">
<ul class="article__toc">
        <li class="toc__h2">
            <a href="#toc_h2_0">摘要</a>
        </li>
        <li class="toc__h3">
            <a href="#toc_h3_1">环境</a>
        </li>
        <li class="toc__h3">
            <a href="#toc_h3_2">下载Liferay 5.1.1</a>
        </li>
        <li class="toc__h3">
            <a href="#toc_h3_3">配置数据库</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_4">配置数据源</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_5">生成数据库</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_6">创建数据库用户</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_7">添加数据库连接驱动</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_8">测试登录</a>
        </li>
        <li class="toc__h3">
            <a href="#toc_h3_9">整合CAS</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_10">配置CAS Server</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_11">启用Tomcat SSL</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_12">配置CAS Client</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_13">使用JDK工具keytool生成SSL证书</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_14">测试SSL连接</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_15">配置CAS</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_16">CAS登录验证</a>
        </li>
        <li class="toc__h5">
            <a href="#toc_h5_17">定制CAS登录验证</a>
        </li>
        <li class="toc__h2">
            <a href="#toc_h2_18">总结</a>
        </li>
</ul>        </div>
        <div id="b3logsolocomments"></div>
        <div class="wrapper">
            <div id="vcomment"
                 style="    margin-bottom: 40px; margin-top: 80px;
        border: 1px solid rgba(255,255,255,0.8);
        border-radius: 5px;
        background: rgba(255,255,255,0.9);
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        padding: 20px;"
                 data-name="88250" data-postId="1219250340000"></div>
        </div>
    <div class="article__bottom">
        <div class="wrapper">
            <div class="fn__flex">
                    <div class="item" id="externalRelevantArticles"></div>
                <div class="item" id="randomArticles"></div>
                <div class="item" id="relevantArticles"></div>
            </div>
        </div>
    </div>
    
</div>
<script type="text/javascript"
        src="https://cdn.jsdelivr.net/gh/88250/solo@4.2.0/src/main/resources/skins/Bubble/js/TweenMax.min.js?1593357893538"
        charset="utf-8"></script>
<footer class="footer">
    <div class="wrapper">
            <a href="https://hacpai.com/member/88250"
       title="https://hacpai.com/member/88250"
       class="user__site"
       target="_blank" rel="noopener nofollow">
        <svg viewBox="0 0 32 32" width="100%" height="100%">
            <path fill="#d23f31" style="fill: var(--color1, #d23f31)" d="M5.787 17.226h17.033l5.954 9.528c0.47 0.752 0.003 1.361-1.042 1.361h-15.141z"></path>
            <path d="M10.74 3.927h17.033c1.045 0 1.512 0.609 1.042 1.361l-5.954 9.528h-19.872l6.379-10.209c0.235-0.376 0.849-0.681 1.372-0.681z"></path>
            <path d="M2.953 17.226h2.839l6.804 10.889h-1.892c-0.523 0-1.137-0.305-1.372-0.681z"></path>
        </svg>
    </a>

        <a href="https://github.com/88250"
           title="https://github.com/88250"
           class="user__site"
           target="_blank" rel="noopener nofollow">
            <svg viewBox="0 0 32 32" width="100%" height="100%">
                <path d="M16 0.331c-8.836 0-16 7.163-16 16 0 7.069 4.585 13.067 10.942 15.182 0.8 0.148 1.094-0.347 1.094-0.77 0-0.381-0.015-1.642-0.022-2.979-4.452 0.968-5.391-1.888-5.391-1.888-0.728-1.849-1.776-2.341-1.776-2.341-1.452-0.993 0.11-0.973 0.11-0.973 1.606 0.113 2.452 1.649 2.452 1.649 1.427 2.446 3.743 1.739 4.656 1.33 0.143-1.034 0.558-1.74 1.016-2.14-3.554-0.404-7.29-1.777-7.29-7.907 0-1.747 0.625-3.174 1.649-4.295-0.166-0.403-0.714-2.030 0.155-4.234 0 0 1.344-0.43 4.401 1.64 1.276-0.355 2.645-0.532 4.005-0.539 1.359 0.006 2.729 0.184 4.008 0.539 3.054-2.070 4.395-1.64 4.395-1.64 0.871 2.204 0.323 3.831 0.157 4.234 1.026 1.12 1.647 2.548 1.647 4.295 0 6.145-3.743 7.498-7.306 7.895 0.574 0.497 1.085 1.47 1.085 2.963 0 2.141-0.019 3.864-0.019 4.391 0 0.426 0.288 0.925 1.099 0.768 6.354-2.118 10.933-8.113 10.933-15.18 0-8.837-7.164-16-16-16z"></path>
            </svg>
        </a>

 <br>
        &copy; 2020
        <a href="https://dl88250.gitee.io">D 的个人博客</a>
        
        <span class="footer__heart">❤️</span>
    </div>
</footer>
<svg class="side__top" id="sideTop" version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
    <path d="M26.562 13.958c0 0.72 0.583 1.303 1.303 1.303s1.303-0.583 1.303-1.303v0c0-0.72-0.583-1.303-1.303-1.303s-1.303 0.583-1.303 1.303v0zM23.305 10.7c0 0 0 0 0 0 0 0.72 0.583 1.303 1.303 1.303s1.303-0.583 1.303-1.303c0-0 0-0 0-0v0c0-0 0-0 0-0 0-0.72-0.583-1.303-1.303-1.303s-1.303 0.583-1.303 1.303c0 0 0 0 0 0v0zM20.022 7.417c0 0 0 0 0 0 0 0.72 0.583 1.303 1.303 1.303s1.303-0.583 1.303-1.303c0-0 0-0 0-0v0c0-0 0-0 0-0 0-0.72-0.583-1.303-1.303-1.303s-1.303 0.583-1.303 1.303c0 0 0 0 0 0v0zM29.67 0h-27.339c-0.677 0-1.228 0.551-1.228 1.228s0.551 1.228 1.228 1.228h11.151l-10.725 10.725c-0.476 0.476-0.476 1.253 0 1.729 0.226 0.226 0.551 0.351 0.852 0.351s0.626-0.125 0.852-0.351l10.074-10.074v25.936c0 0.677 0.551 1.228 1.228 1.228s1.228-0.551 1.228-1.228v-26.011c0.476 0.426 1.203 0.426 1.679-0.050s0.476-1.253 0-1.729l-0.576-0.576h11.577c0.677 0 1.228-0.551 1.228-1.228 0-0.626-0.551-1.178-1.228-1.178z"></path>
</svg>
<script>
  var Label = {
    speech: true,
    servePath: "https://dl88250.gitee.io",
    staticServePath: "https://cdn.jsdelivr.net/gh/88250/solo@4.2.0/src/main/resources",
    luteAvailable: true,
    hljsStyle: 'monokai',
    langLabel: "zh_CN",
    version: "4.2.0",
    staticSite: true,
    showCodeBlockLn: true,
  }
</script>
<script type="text/javascript"
        src="https://cdn.jsdelivr.net/gh/88250/solo@4.2.0/src/main/resources/skins/Bubble/js/common.min.js?1593357893538"
        charset="utf-8"></script>
<script type="text/javascript"
        src="https://cdn.jsdelivr.net/gh/88250/solo@4.2.0/src/main/resources/skins/Bubble/js/circleMagic.min.js?1593357893538"
        charset="utf-8"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kanbanniang@0.2.8/index.css"/>
<script async src="https://cdn.jsdelivr.net/npm/kanbanniang@0.2.8/index.js"></script>
<div class="solo-kanbanniang">
    <div class="solo-kanbanniang__tip"></div>
    <canvas id="soloKanbanniang" width="280" height="250"></canvas>
    <div class="solo-kanbanniang__tool">
        <svg id="soloKanbanniangHome" viewBox="0 0 32 32" width="100%" height="100%">
            <path d="M32 18.967l-16-12.42-16 12.42v-5.064l16-12.42 16 12.42zM28 18.516v12h-8v-8h-8v8h-8v-12l12-9z"></path>
        </svg>
        <svg id="soloKanbanniangRSS" viewBox="0 0 1024 1024" width="32" height="32">
            <path d="M320.364 768q0 45.728-32 77.728t-77.728 32-77.728-32-32-77.728 32-77.728 77.728-32 77.728 32 32 77.728zM612.94 838.272q1.152 16-9.728 27.424-10.272 12-26.848 12h-77.152q-14.272 0-24.576-9.44t-11.424-23.712q-12.576-130.848-105.44-223.712t-223.712-105.44q-14.272-1.152-23.712-11.424t-9.44-24.576V402.24q0-16.576 12-26.848 9.728-9.728 24.576-9.728h2.848q91.424 7.424 174.848 46.016t148 103.712q65.152 64.576 103.712 148t46.016 174.848z m292.576 1.152q1.152 15.424-10.272 26.848-10.272 11.424-26.272 11.424h-81.728q-14.848 0-25.44-10.016t-11.136-24.288q-6.848-122.848-57.728-233.44t-132.288-192-192-132.288-233.44-58.272q-14.272-0.576-24.288-11.136t-10.016-24.864V109.664q0-16 11.424-26.272 10.272-10.272 25.152-10.272h1.728q149.728 7.424 286.56 68.576t243.136 168q106.848 106.272 168 243.136t68.576 286.56z"></path>
        </svg>
        <svg id="soloKanbanniangChat" viewBox="0 0 1024 1024" width="32" height="32">
            <path d="M802.42709 96.163153H219.476155c-84.48109 0-154.896836 71.746044-154.896836 157.840888v393.119449c0 86.072331 70.415746 157.819398 154.896836 157.819399h214.038818V925.470963s22.526039 40.168862 64.767096 5.734608c30.965246-25.819039 126.721123-91.828428 171.775248-123.385145h132.369773c84.502579 0 154.896836-83.21526 154.896836-157.839865V251.125481c0-86.094844-70.394257-154.962328-154.896836-154.962328zM301.144176 518.002714c-39.427988 0-70.416769-31.576159-70.416769-71.746044 0-40.168862 30.988782-71.746044 70.416769-71.746044 39.426965 0 70.393233 31.577183 70.393234 71.746044 0 40.169885-30.966269 71.746044-70.393234 71.746044z m208.411657 0c-39.450501 0-70.415746-31.576159-70.415746-71.746044 0-40.168862 30.965246-71.746044 70.415746-71.746044 39.405475 0 70.394257 31.577183 70.394257 71.746044 0 40.169885-30.988782 71.746044-70.394257 71.746044z m211.203236 0c-39.426965 0-70.416769-31.576159-70.416769-71.746044 0-40.168862 30.988782-71.746044 70.416769-71.746044s70.415746 31.577183 70.415746 71.746044c-0.001023 40.169885-30.988782 71.746044-70.415746 71.746044z"></path>
        </svg>
        <svg id="soloKanbanniangChange" viewBox="0 0 1024 1024" width="32" height="32">
            <path d="M936.672 193.216l-226.88-64c-8.704-2.528-18.112-1.12-25.824 3.776-7.68 4.864-12.896 12.736-14.432 21.728C655.712 236.928 595.328 288 512 288c-71.424 0-142.464-103.296-163.776-143.104-7.136-13.28-22.528-19.84-37.024-15.68l-224 64C73.472 197.152 64 209.728 64 224v256a31.93 31.93 0 0 0 11.712 24.736c7.392 6.08 17.152 8.512 26.56 6.624L224 487.04V832c0 52.928 43.072 96 96 96h384c52.928 0 96-43.072 96-96V519.04l121.728 24.352c9.44 1.92 19.2-0.544 26.56-6.624C955.68 530.656 960 521.6 960 512V224c0-14.336-9.536-26.912-23.328-30.784zM672 800H352c-17.664 0-32-14.304-32-32s14.336-32 32-32h320c17.696 0 32 14.304 32 32s-14.304 32-32 32z"></path>
        </svg>
        <svg id="soloKanbanniangPhoto" viewBox="0 0 1024 1024" width="32" height="32">
            <path d="M898.048 258.048q23.552-1.024 46.592 9.216t40.96 27.136 28.672 39.424 10.752 46.08l0 390.144q0 24.576-10.752 47.104t-28.672 40.448-40.96 28.16-47.616 10.24l-697.344 0q-24.576 0-48.64-10.24t-42.496-27.648-29.696-40.448-11.264-48.64l0-381.952q0-22.528 10.752-45.568t28.672-41.472 39.936-30.208 44.544-11.776l63.488 0 13.312-83.968q3.072-20.48 18.432-32.768t34.816-12.288l456.704 0q19.456 0 34.304 10.752t16.896 34.304l14.336 83.968 54.272 0zM548.864 712.704q40.96 0 77.824-15.872t63.488-42.496 42.496-62.976 15.872-77.312-15.872-77.312-42.496-62.976-63.488-42.496-77.824-15.872-77.312 15.872-63.488 42.496-43.008 62.976-15.872 77.312 15.872 77.312 43.008 62.976 63.488 42.496 77.312 15.872z"></path>
        </svg>
        <svg id="soloKanbanniangGithub" viewBox="0 0 1024 1024" width="32" height="32">
            <path d="M1024 524.8c0 114.346667-32.554667 217.216-97.706667 308.565333-65.066667 91.306667-149.162667 154.538667-252.288 189.610667-11.989333 2.304-20.778667 0.682667-26.325333-4.778667a27.605333 27.605333 0 0 1-8.362667-20.48v-144.213333c0-44.16-11.52-76.501333-34.645333-97.024 25.344-2.730667 48.085333-6.826667 68.309333-12.288a268.629333 268.629333 0 0 0 62.72-26.666667 187.434667 187.434667 0 0 0 53.973334-45.44c14.421333-18.005333 26.197333-41.898667 35.328-71.765333 9.088-29.824 13.653333-64.128 13.653333-102.826667 0-55.125333-17.536-102.058667-52.650667-140.8 16.426667-41.429333 14.677333-87.893333-5.333333-139.392-12.458667-4.096-30.464-1.578667-54.016 7.509334a355.328 355.328 0 0 0-61.312 30.08L640 271.274667a462.336 462.336 0 0 0-128-17.749334c-43.989333 0-86.656 5.930667-128 17.749334a589.824 589.824 0 0 0-28.330667-18.432c-11.776-7.253333-30.336-16.042667-55.68-26.325334-25.344-10.24-44.416-13.312-57.301333-9.216-19.584 51.498667-21.12 97.962667-4.693333 139.434667-35.114667 38.698667-52.650667 85.632-52.650667 140.757333 0 38.698667 4.565333 72.874667 13.653333 102.485334 9.130667 29.610667 20.778667 53.546667 34.986667 71.765333 14.250667 18.218667 32.128 33.493333 53.674667 45.781333 21.546667 12.288 42.453333 21.205333 62.677333 26.666667 20.224 5.461333 43.008 9.557333 68.309333 12.288-17.749333 16.384-28.629333 39.850667-32.64 70.4a130.005333 130.005333 0 0 1-29.994666 10.24c-10.666667 2.261333-23.338667 3.413333-37.973334 3.413333-14.72 0-29.269333-4.906667-43.690666-14.677333-14.464-9.813333-26.794667-24.064-36.992-42.709333a109.226667 109.226667 0 0 0-32.341334-35.541334c-13.141333-9.130667-24.106667-14.592-33.024-16.426666l-13.312-2.048c-9.344 0-15.786667 1.024-19.328 3.072-3.584 2.090667-4.693333 4.693333-3.328 7.893333 1.28 3.157333 3.328 6.4 5.973334 9.557333 2.688 3.2 5.546667 5.930667 8.661333 8.192l4.693333 3.413334c9.770667 4.565333 19.413333 13.226667 29.013334 25.984 9.514667 12.757333 16.512 24.362667 20.992 34.858666l6.656 15.701334c5.76 17.322667 15.530667 31.317333 29.312 42.026666 13.781333 10.666667 28.672 17.536 44.672 20.48 16 2.986667 31.445333 4.565333 46.336 4.821334 14.890667 0.213333 27.221333-0.597333 36.992-2.389334l15.36-2.730666c0 17.28 0.085333 37.546667 0.298666 60.8l0.341334 36.906666a27.050667 27.050667 0 0 1-8.661334 20.48c-5.76 5.461333-14.677333 7.082667-26.666666 4.778667-103.125333-35.072-187.221333-98.261333-252.330667-189.610667C32.554667 742.058667 0 639.146667 0 524.8c0-95.232 22.869333-183.04 68.693333-263.466667A516.266667 516.266667 0 0 1 254.976 70.4C333.44 23.466667 419.114667 0 512 0c92.885333 0 178.56 23.466667 256.981333 70.4a516.266667 516.266667 0 0 1 186.368 190.976C1001.130667 341.802667 1024 429.653333 1024 524.842667z"></path>
        </svg>
        <svg id="soloKanbanniangClose" viewBox="0 0 1024 1024" width="32" height="32">
            <path d="M517.572566143763 1018.6748601482986C238.26554897656422 1018.6748601482986 11.897910175114305 792.2714997690043 11.897910175114305 513.0002041796496c0-279.3070171671984 226.36763880144977-505.71037754649296 505.6746559686481-505.71037754649296 279.2712955893538 0 505.6746559686481 226.40336037929444 505.6746559686481 505.71037754649296C1023.2472221124112 792.2714997690043 796.8795833109612 1018.6748601482986 517.572566143763 1018.6748601482986zM754.7281214542927 339.25044954334646c13.752807470184345-13.752807470184345 9.680547595895998-40.186775075214015-9.073280772537204-58.94060344364717l-2.143294670678079-2.1075730928334457c-18.7538283684332-18.7538283684332-45.15207439561819-22.861809820566194-58.90488186580257-9.073280772537204l-168.21291007038468 168.24863164822932-180.42968969324974-180.46541127109438c-13.967136937252159-13.967136937252159-40.72259874288353-9.823433907274534-59.72647815622916 9.216167083915742l-2.143294670678079 2.143294670678079c-19.039600991190277 19.003879413345654-23.111860865478626 45.75934121897699-9.180445506071107 59.655035000539876l180.42968969324974 180.46541127109438-176.07165719620428 176.03593561835962c-13.788529048028984 13.824250625873615-9.716269173740633 40.151053497369375 9.073280772537204 58.94060344364717l2.1075730928334457 2.1075730928334457c18.7538283684332 18.7538283684332 45.15207439561819 22.897531398410823 58.90488186580257 9.073280772537204l176.10737877404887-176.10737877404887 170.39192631890742 170.42764789675192c13.967136937252159 13.931415359407513 40.686877165038865 9.85915548511917 59.690756578384516-9.180445506071107l2.1790162485227142-2.1790162485227142c19.039600991190277-18.968157835501014 23.147582443323273-45.72361964113239 9.180445506071107-59.690756578384516l-170.39192631890742-170.42764789675192L754.7281214542927 339.25044954334646z"></path>
        </svg>
    </div>
</div>

    <svg viewBox="0 0 32 32" width="100%" height="100%" class="side__top side__top--toc">
        <path d="M30 18h-28c-1.1 0-2-0.9-2-2s0.9-2 2-2h28c1.1 0 2 0.9 2 2s-0.9 2-2 2zM30 6.25h-28c-1.1 0-2-0.9-2-2s0.9-2 2-2h28c1.1 0 2 0.9 2 2s-0.9 2-2 2zM2 25.75h28c1.1 0 2 0.9 2 2s-0.9 2-2 2h-28c-1.1 0-2-0.9-2-2s0.9-2 2-2z"></path>
    </svg>

<script type="text/javascript">
    Util.addScript('https://cdn.jsdelivr.net/gh/88250/solo@4.2.0/src/main/resources/js/page.min.js?1593357893538', 'soloPageScript')
    var page = new Page({
        "commentContentCannotEmptyLabel": "评论内容只能为 2 到 500 个字符！",
        "oId": "1219250340000",
        "blogHost": "https://dl88250.gitee.io",
        "randomArticles1Label": "随机阅读：",
        "externalRelevantArticles1Label": "站外相关阅读："
    });
    $(document).ready(function () {
        page.load();
    page.tips.externalRelevantArticlesDisplayCount = "7";
        page.loadRandomArticles('<h3>随机阅读</h3>');
        page.loadExternalRelevantArticles("Network Engineering,Open Source,Portal &amp; Portlet,J2EE/JavaEE,CAS &amp; SAML &amp; SSO",
        '<h3>站外相关阅读</h3>');
        page.loadRelevantArticles('1219250340000', '<h3>相关阅读</h3>');
    Skin.initArticle()
    });
</script>

</body>
</html>

<!-- Generated by Latke (https://github.com/88250/latke) in 148ms, 2020/06/28 23:27:05 -->